# Contributor: guddaff <alpine@guddaff.de>
# Maintainer: guddaff <alpine@guddaff.de>
pkgname=rosenpass
pkgver=0.2.1
pkgrel=0
pkgdesc="Formally verified, post-quantum secure VPN using WireGuard"
url="https://rosenpass.eu/"
license="MIT OR Apache-2.0"
# armv7/riscv64 cmake fails (OQS), armhf build freezes
arch="all !armv7 !armhf !riscv64 "
makedepends="cargo clang-dev cmake libsodium-dev linux-headers cargo-auditable"
source="https://github.com/rosenpass/rosenpass/archive/v$pkgver/rosenpass-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --locked --target="$CTARGET"
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/rosenpass rp -t "$pkgdir"/usr/sbin/
}

sha512sums="
91d6c3dd201849dea99431201e6bbe393c056dcdba6f612bea6fb33c9d9f5bdb749aadfed66ed0e0a3ed25a579d83719b8ad90062132eb0158fd712b3fa1d2eb  rosenpass-0.2.1.tar.gz
"
